package  com.baidu.demo1;

public class Student {
    public String name;
    public int age;
    public static String classes;

    //实例代码块，初始化成员变量
    {
        name = "张三";
        age = 18;
        System.out.println("构造");
    }

    //静态代码块，初始化静态成员变量，静态代码块会首先执行
    static {
        classes = "三年一班";
        System.out.println("静态");
    }
    public class OuterClass{
        public class InnerClass{

        }
    }
    //OuterClass是外部类
    //InnerClass是内部类

    public static void main(String[] args) {
        Student stu = new Student();
        System.out.println(stu.name + stu.age + Student.classes);
    }
}